const { sequelize, DataTypes } = require('../utill/getSequelize')

//班级表
const T_class = sequelize.define('T_class', {

  id: {
    type: DataTypes.INTEGER,
    primaryKey: true,
    autoIncrement: true,
  },


  class_name: {//班级名称
    type: DataTypes.STRING,
    allowNull: false,
  }

});



//同步模型和数据库表
(async () => {
  try {
    await sequelize.sync({ force: false });
    console.log('All models were synchronized successfully.');
  } catch (error) {
    console.log(error);
  }

})();

//提供出去
module.exports = { T_class };